﻿@using BlogEngine.Core;
@{
    string loginText = Security.IsAuthenticated ? Resources.labels.logoff : Resources.labels.login;
    string loginUrl = Security.IsAuthenticated ? Utils.RelativeWebRoot + "Account/login.aspx?logoff" : Utils.RelativeWebRoot + "Account/login.aspx";

    bool isPost = Request.Url.PathAndQuery.IndexOf("/post/", StringComparison.OrdinalIgnoreCase) != -1;
    bool isPage = Request.Url.PathAndQuery.IndexOf("/page/", StringComparison.OrdinalIgnoreCase) != -1;
    string bodyCss = string.Format("sidebars{0}{1}",
        isPost ? " single-post" : string.Empty,
        isPage ? " page" : string.Empty);
}
<!DOCTYPE html>
<html>
<head>
    <title>@Page.Title</title>
    <link rel="shortcut icon" href="@Href(Utils.RelativeWebRoot + "pics/blogengine.ico")" type="image/x-icon"/>
    <link href="@Href(Utils.RelativeWebRoot + "themes/" + BlogSettings.Instance.Theme + "/style.css")" rel="stylesheet" type="text/css" />
</head>
<body class="@bodyCss">
    <div id="navigation">
    </div>
    <div id="wrapper">
        <div id="container" class="clear-block">
            <div id="header">
                <div id="logo-floater">
                    <h1>
                        <a href="@Utils.AbsoluteWebRoot">@BlogSettings.Instance.Name</a> <span style="font-style: italic;
                            font-size: 60%;">@BlogSettings.Instance.Description</span>
                    </h1>
                </div>
                <!-- <ul class="links primary-links"> -->
                <ul id="dropmenu">
                    <li><a href="@(Utils.AbsoluteWebRoot)" rel="home">@(Resources.labels.home)</a></li>
                    <li><a href="@(Utils.AbsoluteWebRoot)archive.aspx">@(Resources.labels.archive)</a></li>
                    <li><a href="@(Utils.AbsoluteWebRoot)contact.aspx">@(Resources.labels.contact)</a></li>
                    @foreach (BlogEngine.Core.Page parentPage in BlogEngine.Core.Page.Pages.Where(p => !p.HasParentPage))
                    {
                        <li class="page_item"><a href="@parentPage.RelativeLink" title="@parentPage.Title">@parentPage.Title</a>
                            @if (parentPage.HasChildPages)
                            {
                                <ul class="menu">
                                    @foreach (BlogEngine.Core.Page childPage in BlogEngine.Core.Page.Pages.Where(p => p.Parent == parentPage.Id))
                                    {
                                        <li class="page_item"><a href="@childPage.RelativeLink" title="@childPage.Title">@childPage.Title</a></li>
                                    }
                                </ul>
                            }
                        </li>
                    }
                    <li><a href="@(Utils.FeedUrl)">@Resources.labels.subscribe</a></li>
                </ul>
            </div>
            <!-- /header -->

            <div id="sidebar-left" class="sidebar">
                <div class="menu">
                    @Html.Raw(Html.RenderWidgetZone("be_WIDGET_ZONE"))
                </div>
            </div>

            <div id="center">
                <div id="squeeze">
                    <div class="right-corner">
                        <div class="left-corner">
                            <!-- begin content -->


                            <div class="node">
                                @RenderBody()
                            </div>


                            <!-- end content -->
                            <span class="clear"></span>
                            <div id="footer">
                                Theme: Garland-revisited by Pross &bull; Adapted
                                by <a href="http://allben.net/">Ben Amada</a><br />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
            <div id="sidebar-right" class="sidebar">
                <div class="menu">
                    @Html.Raw(Html.RenderWidgetZone("right-sidebar"))
                </div>
            </div>
        </div>
        <!-- /container -->
    </div>
</body>
</html>
